<template>
  <router-view />
</template>

<script setup>
import useSettingsStore from '@/store/modules/settings'
import { handleThemeStyle } from '@/utils/theme'
import {getCurrentInstance, ref} from "vue";
import useUserStore from "@/store/modules/user";
const {proxy} = getCurrentInstance();
onMounted(() => {
  nextTick(() => {
    // 初始化主题样式
    handleThemeStyle(useSettingsStore().theme)
      useUserStore().getInfo().then(res=>{
          // 确保 登录成功后再做ws连接
          proxy.socket.init()
      })
  })
})
</script>
